﻿<div ng-controller="articleController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li><a href="javascript:void(0)" ng-click="goBack()">文章</a></li>
                <li class="active" ng-bind="breadcrumb"></li>
            </ol>
        </div>
    </div>
    <form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" role="form" novalidate>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">标题</label>
            <div class="col-sm-3">
                <input type="text" name="title" class="form-control " ng-model="model.title" ng-maxlength="35" placeholder="请输入文章标题" required>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">内容</label>
            <div class="col-sm-10">
                <textarea keditor="editConfig" name="description" class="form-control input-sm" ng-model="model.description" rows="4" ng-change="textAreaChanged(1)" required></textarea>
                <span ng-show="_form.description.$invalid && !_form.description.$pristine" class="w5c-error">请填写文章内容</span>
                <span class="help-block" id="textcount">0/500</span>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-3">
                <button ng-if="model.status != 1 || model.id == 0" type="submit" w5c-form-submit="save()" class="btn btn-primary btn-sm" btn-loading="psdisabled.save" loading-text="保存中..." ng-disabled="psdisabled.save">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button ng-if="model.status != 1" ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 取消</button>
                <button ng-if="model.status == 1" ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 返回</button>
            </div>
        </div>
    </form>
</div>